<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include("../../includes/appheader.php");
include("../../includes/functions.php");

$city=$_GET['city'];
$propertyType=$_GET['propertyType'];
$offerType=$_GET['offerType'];
$priceFrom=$_GET['fromPrice'];
$priceTo=$_GET['toPrice'];

$properties=getApartments($city,$offerType,$propertyType,$priceFrom,$priceTo);
?>

<div id="resultGridHeader" class="resultGridHeader" >
<table class="resultTable" cellpadding="0" cellspacing="1" border="0" width="320px">
    <thead>
        <tr>
            <th width="80px">Tarih</th>
            <th width="70px">Turu</th>
            <th width="75px">Oda</th>
            <th width="50px">Alan</th>
            <th width="50px">Fiyat</th>
        </tr>
    </thead>
</table>
</div>
<div id="resultGrid" class="resultGrid">
<table class="resultTable" cellpadding="0" cellspacing="1" border="0" width="320px">
    <tbody>
        <?php
        $i=1;
        foreach($properties as $property){
            ?>
        <tr  id="result<?php echo $property['id'];?>" <?php if(($i % 2) == 0){ echo "class=\"whitesmoke\"";} ?> >
            <td width="80px" align="center"><?php echo $property['registerdate'];?></td>
            <td width="70px" align="center"><?php echo $property['offertype'];?></td>
            <td width="75px" align="center"><?php echo $property['livingRoom'];?></td>
            <td width="50px" align="center"><?php echo $property['area'];?></td>
            <td width="50px" align="center"><?php echo $property['price'];?></td>
        </tr>

            <?php $i++; }?>
    </tbody>
</table>
</div>

